package ru.sanluck.tg;

import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Repository
public interface TgUserRepository extends CrudRepository<TgUserEntity, Integer> {
    Optional<TgUserEntity> findByUserName(String userName);
    // TODO
//    @Modifying
//    @Query("update TgUserEntity user set user.dialog = :dialog where user.userName = ")
//    int updateDialog(String userName, Dialog dialog);
}
